//sound preload
soundManager.url = 'sm2';
soundManager.debugMode = false;
//
var alm0_song = 'alm0';
var alm1_song = 'alm1';
var alm_times = 0;
//
soundManager.onload = function() {
  // soundManager is initialised, ready to use. Create a sound for this demo page.
  soundManager.createSound('alm0','sounds/beep.mp3');
  soundManager.createSound('alm1','sounds/alarm.mp3');
//
soundManager.play(alm0_song);
}
//
function sMLoop(){
if (alarm_state==1 && alm_times>0){
alm_times--;
soundManager.play(alm1_song);
window.setTimeout("sMBeep();",3000);
}
else
{
window.setTimeout("rst_pv();",3000);
soundManager.stop(alm1_song);
}
}
//
function sMBeep(){
window.setTimeout("sMLoop();",3000);
}
//
//soundmanager - Scott Schiller (schillmania.com)